package org.revise;

import lombok.SneakyThrows;

/**
 * @author ${USER}
 * @date ${DATE} ${TIME}
 */
public class Main {
    @SneakyThrows
    public static void main(String[] args) {
        Main main = new Main();
        new Thread(Main::get, "1").start();
        Thread.sleep(100);
        main.get1();

    }

    @SneakyThrows
    public static synchronized void get() {
        Thread.sleep(1000);
        System.out.println("1234");
    }

    public void get1(){
        synchronized (Main.class){
            System.out.println("4321");
        }
    }

}
